/*
* @description 存储配置
* @author captern
* @gitee  https://gitee.com/captern
*/
const {isProd} = require('../utils/env')
let REDIS_CONF = {
  port: 6379,
  host: '127.0.0.1'
}

let MYSQL_CONF = {
  host: '127.0.0.1',
  dialect: 'mysql',
  password: '19930211Hz',
  port: '3306',
  user: 'root',
  database: 'weibo_db'
}


if(isProd) {
  // 线上的 redis 配置
  REDIS_CONF = {
    port: 6379,
    host: '127.0.0.1'
  }
  // 线上的 数据库 配置
  MYSQL_CONF = {
    host: '127.0.0.1',
    dialect: 'mysql',
    user: 'root',
    password: '19930211Hz',
    port: '3306',
    database: 'weibo_db'
  }
}

module.exports = {
  REDIS_CONF,
  MYSQL_CONF
}
